package cn.skcks.controller;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

// 只要实现了 Controller 的类 就是一个控制器
public class TestController implements Controller {
	public ModelAndView handleRequest(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
		ModelAndView modelAndView = new ModelAndView();

		modelAndView.addObject("msg","TestController");
		modelAndView.setViewName("test");
		return modelAndView;
	}
}